import requests

r = requests.head("http://www.baidu.com/")

print(r.headers)